# https://juejin.cn/s/pytorch%20docker%20gpu%20jupyter
# FROM nvidia/cuda:11.5.0-cudnn8-runtime-ubuntu20.04

# docker pull nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04

# FROM nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04


ARG IMAGE=cuda_python_rdp
FROM $IMAGE



RUN pip3 install --no-cache-dir -U pip && \
    pip3 install --no-cache-dir jupyter && \
    pip3 install  --no-cache-dir seaborn matplotlib numpy pandas

# pip3 install

#########

# 安装 PyTorch 和相关依赖
RUN pip3 install --no-cache-dir torch torchvision

RUN pip3 install --no-cache-dir torchaudio torchtext torchtext

# # 这个 加 tsinghua index -i http 404 ...
# RUN pip3 install --no-cache-dir torchvideo

#########

COPY fileroot /
# COPY .bash_profile .bashrc .profile /root/
# COPY entrypoint.sh /entrypoint.sh
# COPY /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# COPY /etc/timezone /etc/timezone

VOLUME ["/data", "/home"]
# ssh rdp jupyter 
EXPOSE 22 3389 8888

#CMD ["bash", "/entrypoint.sh"]
ENTRYPOINT ["bash", "/entrypoint.cuda_pytorch.sh"]
# 运行 Jupyter Notebook
# CMD ["jupyter", "notebook","--no-browser","--ip='*'", "--allow-root","--notebook-dir='/data/'"]

# jupyter notebook --ip='*' --NotebookApp.token='' --NotebookApp.password='' --allow-root



